#include "Input.h"
#include "Draw.h"

All::Draw input_draw;

void All::Input::keyboard_input(unsigned char key, int x, int y) {
	if (key == 27) {
		printf("Application stopped.\n");
		exit(0);
	}
}

void All::Input::mouse_input(int button, int state, int x, int y) {
	//printf("Mouse\n");
	switch (button) {
	case GLUT_LEFT_BUTTON:
		if (state == GLUT_DOWN) {
			printf("Mouse left\n");
			input_draw.Background(1.0, 0.0, 0.0);
		}
		break;
	case GLUT_RIGHT_BUTTON:
		if (state == GLUT_DOWN) {
			printf("Mouse right\n");
			input_draw.Background(0.25, 0.25, 0.25);
		}
		break;
	case GLUT_MIDDLE_BUTTON:
		if (state == GLUT_DOWN) {
			printf("LOOOOOOOOOOOOOL\n");
			//printf("%.2g", x, "\n");
		}
		break;
	default:
		break;
	}
}